<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Project2: Thread Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Project2
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_thread-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Thread Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac5757c1225def6c3537c0ea53d0947d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5757c1225def6c3537c0ea53d0947d3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Thread</b> (char *debugName)</td></tr>
<tr class="separator:ac5757c1225def6c3537c0ea53d0947d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7631955bc5e11232bb682baa467baf5f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7631955bc5e11232bb682baa467baf5f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Fork</b> (VoidFunctionPtr func, int arg)</td></tr>
<tr class="separator:a7631955bc5e11232bb682baa467baf5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbc2bfb172d2eff4b46882aade9eeb8a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adbc2bfb172d2eff4b46882aade9eeb8a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Yield</b> ()</td></tr>
<tr class="separator:adbc2bfb172d2eff4b46882aade9eeb8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a187a4c1e62087511b69068220840244a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a187a4c1e62087511b69068220840244a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Sleep</b> ()</td></tr>
<tr class="separator:a187a4c1e62087511b69068220840244a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e43c788c40e9783311c970bcea7239b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e43c788c40e9783311c970bcea7239b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Finish</b> ()</td></tr>
<tr class="separator:a1e43c788c40e9783311c970bcea7239b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa6657ff14b9c6866eadd85ea32c9147"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa6657ff14b9c6866eadd85ea32c9147"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>CheckOverflow</b> ()</td></tr>
<tr class="separator:afa6657ff14b9c6866eadd85ea32c9147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf174c2c79bd83095255737ce3850417"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#abf174c2c79bd83095255737ce3850417">Id</a> ()</td></tr>
<tr class="separator:abf174c2c79bd83095255737ce3850417"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6403215a0f5789b6b91b6baf6ccf5059"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#a6403215a0f5789b6b91b6baf6ccf5059">SetId</a> (int)</td></tr>
<tr class="separator:a6403215a0f5789b6b91b6baf6ccf5059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a669e0ae7e3a2e355bcff39f2993ec31a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#a669e0ae7e3a2e355bcff39f2993ec31a">Children</a> ()</td></tr>
<tr class="separator:a669e0ae7e3a2e355bcff39f2993ec31a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a614c9af3009c1e8fd75b1afb6b736739"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#a614c9af3009c1e8fd75b1afb6b736739">isChild</a> (int)</td></tr>
<tr class="separator:a614c9af3009c1e8fd75b1afb6b736739"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ff9e2024810a0795c409aa33f536a57"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#a4ff9e2024810a0795c409aa33f536a57">AddChild</a> (<a class="el" href="class_thread.html">Thread</a> *t, int id)</td></tr>
<tr class="separator:a4ff9e2024810a0795c409aa33f536a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea94203e7d5805e1da6c27285e992756"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#aea94203e7d5805e1da6c27285e992756">RemoveChild</a> (int id)</td></tr>
<tr class="separator:aea94203e7d5805e1da6c27285e992756"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52a2028c463f310ffddd75be2eea83e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#a52a2028c463f310ffddd75be2eea83e9">SetParent</a> (<a class="el" href="class_thread.html">Thread</a> *num)</td></tr>
<tr class="separator:a52a2028c463f310ffddd75be2eea83e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacfd1646f8c33d21d99e17a2ec0aeb49"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_thread.html">Thread</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread.html#aacfd1646f8c33d21d99e17a2ec0aeb49">GetParent</a> ()</td></tr>
<tr class="separator:aacfd1646f8c33d21d99e17a2ec0aeb49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39061ce2692542188f82f909d005b1c3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39061ce2692542188f82f909d005b1c3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setStatus</b> (ThreadStatus st)</td></tr>
<tr class="separator:a39061ce2692542188f82f909d005b1c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeead3fe994a049ef633aac40a0e13988"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeead3fe994a049ef633aac40a0e13988"></a>
char *&#160;</td><td class="memItemRight" valign="bottom"><b>getName</b> ()</td></tr>
<tr class="separator:aeead3fe994a049ef633aac40a0e13988"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad707af00a9ce1a1d324804e7c73dc4ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad707af00a9ce1a1d324804e7c73dc4ab"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Print</b> ()</td></tr>
<tr class="separator:ad707af00a9ce1a1d324804e7c73dc4ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4ff9e2024810a0795c409aa33f536a57"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::AddChild </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_thread.html">Thread</a> *&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Checks if array is full by comparing numChildren to c_ArraySize, will expand if true then adds new thread to c_Array Expects pointer to <a class="el" href="class_thread.html">Thread</a> being added and processId </p>

</div>
</div>
<a class="anchor" id="a669e0ae7e3a2e355bcff39f2993ec31a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Thread::Children </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns number of children (numChildren) </p>

</div>
</div>
<a class="anchor" id="aacfd1646f8c33d21d99e17a2ec0aeb49"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_thread.html">Thread</a> * Thread::GetParent </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns parent pointer variable </p>

</div>
</div>
<a class="anchor" id="abf174c2c79bd83095255737ce3850417"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Thread::Id </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns process Id </p>

</div>
</div>
<a class="anchor" id="a614c9af3009c1e8fd75b1afb6b736739"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::isChild </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns boolean value incdicating whether or not </p>

</div>
</div>
<a class="anchor" id="aea94203e7d5805e1da6c27285e992756"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::RemoveChild </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes child thread by decrementing numChildren, setting pointer to NULL and id to -1 expects an integer id </p>

</div>
</div>
<a class="anchor" id="a6403215a0f5789b6b91b6baf6ccf5059"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::SetId </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets process Id </p>

</div>
</div>
<a class="anchor" id="a52a2028c463f310ffddd75be2eea83e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::SetParent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_thread.html">Thread</a> *&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the parent pointer variable, expects a thread </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="thread_8h_source.html">thread.h</a></li>
<li>thread.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Feb 28 2013 20:46:19 for Project2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>
